home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / chat / ircii-2.8he / ircii-2 / help / ON / ON < prev    next >
Encoding:
Text File  |  1993-05-04  |  5.1 KB  |  120 lines

  1. Usage: ON [#|+|-|^|&|@]<event> [serial] [-|^]<match> [action]
  2.   The ON command lets you set up actions which will occur when
  3.   certains events happen.  For example, you can create
  4.   "personalized" away messages for different individuals,
  5.   periodic actions that occur at specific times, just to name
  6.   a few.
  7.  
  8.   Note that using ON JOIN and ON LEAVE to automatically greet
  9.   people entering or leaving your channel is extremely poor
  10.   etiquette. See /HELP ETIQUETTE.
  11.  
  12. ON [mode]<event> [-|^]<match> [action]
  13. ON [mode]#<event> <serial number> [-|^]<match> [action]
  14.  
  15.   There are seven modes for each event.  I've shown the # mode
  16.   as a separate line because it requires a serial number.
  17.   Different modes are specified by preceeding the event with
  18.   one of the following characters:
  19.     +           Make event very noisy.  It will display
  20.                 everything it does.
  21.     -           Make event quiet.  It will not display any of
  22.                 it's actions.
  23.     ^           Make event silent.  Just like - above except it
  24.                 inhibits the normal event display as well.  The
  25.                 only command that will cause output in this mode
  26.                 is the ECHO command.  This can be used to redefine 
  27.                 how event messages look.
  28.     &        Make the /ON local to only your own server.  e.g.
  29.         /on -&msg * echo One of mine
  30.         Will echo "One of mine" ONLY when someone from my own
  31.         current server sends me a message.  If nothing matches
  32.         in this list, then it will resort to the default ONs.
  33.         Of if there was an /ON ^msg * echo :$0: $1- then it 
  34.          it will use that for anyone not on your server.
  35.     @         This is like & except that it is exclusive to your
  36.         server.  It will NOT look at the default ONs if 
  37.         there is no match for your own server.
  38.     #           Allows you to assign a serial number to the specific
  39.         <event> such that you can have multiple ON's trigger
  40.         of one <event>.  Further discussion of this below.
  41.          Note this is a pound sign NOT a number. The serial
  42.         number comes right after the <event>.
  43.   If no character is specified, you will be warned upon activation 
  44.   of an event (this is somewhere between the + and - modes).
  45.  
  46.   The <match> parameter may be a single word, or a list of words 
  47.   surrounded by double quotes (").  The <match> determines 
  48.   specifically which events of the given <event> will cause 
  49.   the action to take place.  The <match> may contain wildcards,
  50.   and the specifics of the <match> parameter are dependant on
  51.   the <event> type.  
  52.   
  53.   If the <match> is preceeded by a -, that entry will be
  54.   removed from the action list.  For example:
  55.     ON PUBLIC -BigCheese
  56.     ON INVITE  -"* +Har"
  57.   The first will remove "BigCheese" from the PUBLIC list, the second will
  58.   remove -"* +Har" from the INVITE list.
  59.   You can remove all entries from a given event list by doing
  60.   the following:
  61.     ON <event> -
  62.   For example:
  63.     ON MSG -
  64.   removes all entries in the ON MSG list.
  65.  
  66.   If the <match> is preceeded by a ^, then no action will be taken
  67.   for a match for that event (this is used when you wish
  68.   to exclude a nickname or list of nicknames from a larger
  69.   wildcard match, see HELP ON FLOOD for an example).  
  70.  
  71.   Added two new wildcards to the pattern matching system.
  72.   '%' matches any sequence of characters except a space.
  73.   '?' matches any single character.
  74.   e.g.  ON ^msg "bob % % blue" whatever
  75.   would match a message from bob with two words and then the word
  76.   'blue'.
  77.  
  78.   The [action] parameter is that action that will occur when the
  79.   specified event occurs which matches the given <match>.
  80.   The action parameter is parsed by the command parse in exactly
  81.   the same way as an IRCII alias is parsed, using the same inline
  82.   variable expansions (See ALIAS).  Also, depending on the
  83.   event that is activated, there will be certain values passed
  84.   as arguments to the action, just as if they were arguments to
  85.   an alias.  You may use the $0, $1, $2... etc variables to
  86.   expand out these arguments.  The arguments passed for each
  87.   event are described in the individual help files for each event.
  88.  
  89.   Here are some examples:
  90.     ON -MSG *cheese* /NOTICE $0 No Cheese Messages Please!
  91.   Whenver a MSG is received from anyone with a nickname with
  92.   cheese in it, a NOTICE will be sent out to that user.  This
  93.   action will generate no noticeable effect to you (it is marked
  94.   as "quiet").
  95.  
  96.     ON MSG ^BigCheese
  97.   If used with the first example above, this will prevent the
  98.   action from being taken when a message is sent from BigCheese.
  99.  
  100.   Here is an example of how to redefine the way a
  101.   message looks:
  102.     ON ^MSG * /ECHO :$0: $1-
  103.   All MSGs received from now on will look:
  104.  
  105.   :BigCheese: Hello!
  106.   The same can be done with the other event types.
  107.  
  108. IMPORTANT IMPORTANT: A full discussion of serial numbers is
  109.   given in HELP ON serial_numbers as there is too 
  110.   much to place directly in this help file. Please read this one
  111.   as it will help prevent collisions between different scripts.
  112.  
  113.   More examples are given for the individual event types.
  114.  
  115. See Also:
  116.   ON serial_numbers
  117.   ircII programming
  118.   ALIAS
  119.   expressions  (Special Cases is of particular relevance)
  120.